//package com.ruoyi.framework.web.service;
//
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.security.core.userdetails.UserDetails;
//import org.springframework.security.core.userdetails.UserDetailsService;
//import org.springframework.security.core.userdetails.UsernameNotFoundException;
//import org.springframework.stereotype.Service;
//import com.ruoyi.common.core.domain.entity.SysUser;
//import com.ruoyi.common.core.domain.model.LoginUser;
//import com.ruoyi.common.enums.UserStatus;
//import com.ruoyi.common.exception.ServiceException;
//import com.ruoyi.common.utils.MessageUtils;
//import com.ruoyi.common.utils.StringUtils;
//import com.ruoyi.system.service.ISysUserService;
//import com.ruoyi.reader.mapper.ReaderMapper;
//
//
//@Component("MemberDetailsServiceImpl")
//public class MemberDetailsServiceImpl implements UserDetailsService {
//
//    private static final Logger log = LoggerFactory.getLogger(UserDetailsServiceImpl.class);
//
//    @Autowired
//    private ReaderMapper ;
//
//    @Override
//    public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
//        ShopUser member = memberMapper.selectShopUserByPhone(username);//验证登录用户，查询数据库，如果这个mapper定义在自己的模块，引入maven依赖不用我多说吧？
//        System.out.println("这里是会员登录"+member);
//        if (StringUtils.isNull(member)) {
//            log.info("登录用户：{} 不存在.", username);
//            throw new ServiceException("登录用户：" + username + " 不存在");
//        }
//        return createLoginUser(member);
//    }
//
//    public UserDetails createLoginUser(ShopUser member) {
//        return new LoginUser(member.getId(), member);
//    }
//}
